package work.zhengyun.demo.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import work.zhengyun.demo.dao.UserDao;
import work.zhengyun.demo.entity.User;
import work.zhengyun.demo.service.UserService;
import work.zhengyun.demo.vo.UserVo;

import java.util.List;

/**
 * @author zhengyun
 * @date 2019/11/27 9:26
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User findByName(String name) {
        return userDao.findByName(name);
    }

    @Override
    public User findById(Integer id) {
        return userDao.findById(id);
    }

    @Override
    public List<UserVo> findUsers() {
        return userDao.findUsers();
    }

}
